Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Anthropic API support with custom version header #934

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

danackerson
Copy link

Describe the change
Add support for Anthropic models.

Provide documentation link
Anthropic API requests require a custom header "anthropic-version". More details here

Describe your solution
Added new APITypeAnthropic with APIVersion = "2023-06-01" and baseURL of "https://api.anthropic.com/v1"

Tests
Checking correct APIVersion and default baseURL.

Additional context
Currently, trying to override the default config with Anthropic values, fails with a 404 not found error (because there's no request header "anthropic-version":"2023-06-01").

Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.88%. Comparing base (774fc9d) to head (bbdb735).
Report is 83 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #934      +/-   ##
==========================================
+ Coverage   98.46%   98.88%   +0.42%     
==========================================
  Files          24       27       +3     
  Lines        1364     1800     +436     
==========================================
+ Hits         1343     1780     +437     
+ Misses         15       14       -1     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant